﻿using System.Collections.Generic;
using DataService.Structs;

namespace DataService;

public class CompareHistoryData : IComparer<HistoryData>
{
    public int Compare(HistoryData x, HistoryData y)
    {
        int c1 = x.TimeStamp.CompareTo(y.TimeStamp);
        return c1 == 0 ? x.ID.CompareTo(y.ID) : c1;
    }
}
